package com.itjeffrey.autocode.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @From: Jeffrey
 * @Date: 2020/11/11
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("code_generate_tb")
public class CodeGenerateEntity implements Serializable {

    private static final long serialVersionUID  = 1L;

    @TableId(type = IdType.AUTO) //主键自增必须加type类型AUTO，否则会mybatis-plus框架在set id时会报错
    private Integer id; //PK

    @NotNull(message = "数据库驱动名称不能为空！")
    private String dbDriver;

    @NotNull(message = "主机IP不能为空!")
    private String ipHost;

    @NotNull(message = "端口号不能为空！")
    private String portName;

    @NotNull(message = "数据库名称不能为空！")
    private String dbName;

    @NotNull(message = "用户名不能为空！")
    private String userName;

    @NotNull(message = "密码不能为空！")
    private String pswd;

    private String tableName;

    private String projectName;

    private String pkgName;

    private String modelTypes; //json串

}
